package com.youkeyi.ddy.cloud.common.api.application.business.crm.customer;

import com.youkeyi.ddy.cloud.common.api.application.business.crm.customer.param.BusinessQuickCreateCloudParam;
import com.youkeyi.ddy.cloud.common.response.ResponseContent;
import io.swagger.annotations.*;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 快捷创建
 *
 * @author  liuxiawang
 * @Date 5/24/22 10:36 PM
 * @Location shenzhen.china
 */
@Api(tags = {"【BUSINESS】Quick Create"})
@RestController
@FeignClient(value = "YOUKEYI-DDY-CLOUD-APPLICATION-BUSINESS", fallback = BusinessCustomerQuickCloudServiceFallback.class)
@RequestMapping("/business/quick")
public interface BusinessCustomerQuickCloudService {

    // 快捷创建客户与订单
    @ApiOperation(value = "Quick Create Customer And Order", authorizations = {@Authorization("com.youkeyi.ddy.cloud.common.api.application.business.crm.customer.BusinessCustomerQuickCloudService.create")})
    @ApiResponse(code = 200, message = "data Property in Response Body", response = ResponseContent.class)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "param", paramType = "body", value = "Param of Quick Create Customer And Order", dataType = "BusinessQuickCreateCloudParam", dataTypeClass = BusinessQuickCreateCloudParam.class),
    })
    @PostMapping("/create")
    public abstract ResponseContent create(@RequestBody BusinessQuickCreateCloudParam param);

}
